﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caliburn.PresentationFramework.ApplicationModel;
using Caliburn.Core.Metadata;
using System.Windows;
using Microsoft.Practices.ServiceLocation;
using XWord.GUI.Presenters.Infrastructure;

namespace XWord.GUI.Presenters.Fundamental
{

    [Singleton("ApplicationMenu", typeof(ApplicationMenuPresenter))]
    public class ApplicationMenuPresenter : Presenter
    {
        protected override void OnInitialize()
        {
            base.OnInitialize();
        }

        public override void ViewLoaded(object view, object context)
        {
            base.ViewLoaded(view, context);
        }

        public void OpenOptionDialog()
        {
            var presenter = ServiceLocator.Current.GetInstance<OptionManagerPresenter>();
            ServiceLocator.Current.GetInstance<IWindowManager>()
                .ShowDialog(presenter, null, ExecuteShutdownModel);
        }

        public void Exit()
        {
            Application.Current.Shutdown();
        }

        public void OpenTranslateView()
        {
            ServiceLocator.Current.GetInstance<TranslateWordPresenter>().Show();
        }
    }


    public class FootMenuPresenter : Presenter
    {

    }
}
